﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using WebUI.Models;

namespace WebUI.Areas.Bots.Models
{
    public class Schedule : BaseModel
    {
        [Required]
        public DateTime? StartPeriod { get; set; }

        [Required]
        [Range(0, 23, ErrorMessage = "Please enter correct time")]
        public int? StartPeriodHour { get; set; }

        public DateTime? EndPeriod { get; set; }
        [Range(0, 23, ErrorMessage = "Please enter correct time")]
        public int? EndPeriodHour { get; set; }

        [Required]
        [Range(1, int.MaxValue, ErrorMessage = "Please enter value")]
        [RegularExpression("^[0-9]+$", ErrorMessage = "Please enter correct value")]
        public int RecurringValue { get; set; }

        [Required]
        [Range(0, 5, ErrorMessage = "Please enter correct span")]
        public int RecurringSpan { get; set; }
    }
}